/**
 * @program: pettyloan
 * @ClassName AiPayConfig
 * @author: 汪江
 * @create: 2022-12-08 15:30
 **/
package com.wn.pettyloan.config;


import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

    public static String app_id = "2021000120617184";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCjkJzxNsIsiTj9disXx0DcfWx7g99qFoiTYUOQkZpfvIGZYnjHFyGnAvZKxScBhDSkQo3MykXmxHdB8GEgf9YinDR1ccfAtvr7Apk7PXBgCoQ8TbDGDPkXioJNSUJGL2xpBOJp+S5y3mZD33xwyYDo3i5hGjUiTcOjxJIQhrVk/pybtXh7U/XlSmlDkX5GT6PVhMUHX3Eo1DXSDGDkbhZRs9cN961EcADzEffzf4L7fl+vy2we77oM6YDqGpGIey8z5HAzzMNXbL3ojbKPCt5KCbk3ZEf0X19Lq27MBLVWxynlG4u/Vs+M38FQAXRj+TR6vg8dueck47JcyCNiJT6hAgMBAAECggEBAKAJL7XHqScgQHWmuDU0zN6vjYQwnFlVoN3q7cu22v/PFlL4iUnq9Q9PE6JG0opmS4doYwu74bcQBcuroazFx8PnaGB9KkACCQGuIjVXQOuHfqjuLwcozFPfPuzVwBWh8wWyNMIRgAP+XLsOINjOH+Y49dImbVSaF9DV1UB8PWGJNT0KrX8td+wZ5em+D0PqPlVC6CCKlo/jKx2sXsGgqW/OM9XIafKUGJbVkT9kKzQ6cQdUhBtEiNC6zkhLMEeALmOi0UoZuzZpZp+dOW+IMDQCk/1aaOeNZfPSM+efIufxmxq2n7NTZFXU+XXQPfaB17tizxj2Kp41w0nIuBjFX20CgYEA6+7VoXnpG2x6wp4SrodrLYesJj2dVEkgnZvRff/lljKt+Qpn+UevsuvSYppLiFQ+jFzSktLqrk3UySnWhzOg0+OFU0Xh/yn1BcCS7xh/RcOacvSOUi2Y2GXOM72jKflInsbaRbc1c99WQgJF1PRVf2NZOtWEL39PwVJNnjTN60cCgYEAsXoMY1o1/JJ1ZHJ3LZr6uvdS0Nyx62Qaqhsn9wapdPX0jc/mTkNJlpnizCGexYB7MscPDGRBK4UxlhRQemjH430tNY7wg5bTo3jL/T2yMNDPAKKaJV+GVAv4Z0/TvB19w8WjbFu5q7YPOiMuDDtkhhvX2KN8QGHrHK7QkkINKtcCgYEA4lp1o0JvHtxouqcljURm03vC8b1TYDX4kL2Zs6T7A6sDtlcBgewA6UvOwML/jIAmskuryymH9kq9x3HYXEZwGlnC5C27sS7z4NztG28JTElpuLhggv80EQk7V/Csxexge9SUPSaUpeKzwwijLrhr/pe2V/fZpigiwHrR9OL8XKkCgYB1YfXjmHzwiqXeQ98TaNfA5Wf/AJkkyVbhf4iVV/CojSysxv7acKKxWyKoROxQUMQrN4F6fqyj7jp3uwPnknnyuo42SE5HmnBsRK8W1cGPi+v9zY4Kff3IhQpMun2ehBr0aznFp31MVuQHXdFNAdNg5/WBMdAyfREWLYGB2vH+jQKBgGtRvynrLhFeMv9wLcE37gixBfeivmIvxOPkO17s1BVrJadjYaM+Nt26w3FM9V7o+J/PEYX/iyOOSLFzRFZQ+VzC2Cuh/zzrUexPxDXAJVVty5L44bE+5GnXkjLLntUIbi4yDJ3XVmw8eKGfSBxOmXgGvtyuYUIeEbSnckCqiIyW";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgGzAqdRiILeA9aE6UKitu1LWBR+hPOENjSY98kXS6Y40rnZM3ROoGgbWl/0oGQCHTElxMopNo8RQD5m935zXkFMeVoJRZWZIm/xUZGqfJk8nyHbecKKcMimSDBodlH1jXfESUiY2I6BmUCbIgw0j9ryGjOrG8dwYc0/hwnku0b61RUg0T9/et4z1x4YdOVZI3R6prznWXUU82TG6GW/Aa0ETwI0iidCldzz2nXEOQSYycPjTfSnONL5YmeXVNH/H7+5iWeGgDhVKtAoAokW7NjlqdD0fHIug5/XO/mQxZflmSc8PwPfaBQj1ryTv+3JBvPhBmKWdPCrg28rlZqQiXwIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://localhost:8080/alipay/notify_url.view";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://localhost:8080/alipay/return_url.view";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     *
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis() + ".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}



